package lab02.Test19;

/**
 * Created by 李晓容 on 2017/10/31.
 */
public class Test {
    public static void main(String[] args) {
        String s = "HelloWorld";
        StringBuffer buf = new StringBuffer();
        for(int i = s.length()-1 ; i>=0;i--){
            char c = s.charAt(i);
            if(Character.isLowerCase(c)){
                buf.append(String.valueOf(c).toUpperCase());
            }else{
                buf.append(String.valueOf(c).toLowerCase());
            }
        }
        System.out.println(buf.toString());
    }

}
